home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Frameworks / Dragonsmith 1.1.1 / CW 4.5 Update / ! Readme (CodeWarrior) next >
Encoding:
Text File  |  1994-10-22  |  5.1 KB  |  72 lines  |  [TEXT/ttxt]

  1. Changes to “Dragonsmith 1.1.1 by Paul M. Hoffman”
  2. for use with Metrowerks CodeWarrior 4.5
  3. by Francis H Schiffer, 3rd
  4. 22 October 1994
  5.  
  6. The Dragonsmith kit lets programmers easily create drag-and-drop applications (or “dragons”) for use in System 7 or greater.  The following instructions define the changes, which are needed to Dragonsmith 1.1.1, in order to create Dragons with the Metrowerks CodeWarrior development environment.  These changes were developed by Francis H Schiffer, 3rd,  using version 4.5 of CodeWarrior.  
  7.  
  8. The changes to the Dragonsmith kit comprise replacements for 8 of the source code files, which include the changes needed to be compatible with Apple’s Universal Headers and the syntax changes for CodeWarrior C++.  The following steps will convert your Dragonsmith 1.1.1 kit for use with Metrowerks CodeWarrior.
  9.  
  10. Converting Dragonsmith 1.1.1 for CodeWarrior
  11. -----------------------------------------
  12.  
  13. 1.  Create a new Base files folder and copy the source code files from your Dragonsmith 1.1.1 kit.  Rename each *.c file to be *.cp.  This change will remind you that Dragonsmith needs to be compiled with C++.
  14.  
  15. 2.  Replace the following source code files with the new versions from this update kit.
  16.           Dragon.cp
  17.           Dragon.h
  18.           AppleEventQueue.cp
  19.           AppleEventQueue.h
  20.           AppleEventUtils.cp
  21.           FileUtils.cp
  22.           TrapUtils.cp
  23.  
  24. 3.  Move the Dragonsmith.µ file to your new Base files folder .
  25.  
  26. 4.  Update the Dragonsmith library:  Start Metrowerks CodeWarrior using the Dragonsmith.µ project, open PreDragon.cp and precompile the file as PreDragon.  After closing the PreDragon.cp file, use the “Make” option to build a new version of the Dragonsmith.lib.  You may get 7 warnings about “possible unwanted assignment.”  These warnings are not a problem.
  27.  
  28. 5.  If you wish to update the sample Dragons, copy the CodeWarrior project files into your new Base files folder, copy the new version of DPasser.cp, rename the resource files by changing the π to an µ, and execute the “Make” command in each project.  FileCleaver.cp will generate a few warning messages due to its incomplete nature, but none of them are serious.
  29.  
  30. 6.  If you wish to use the Dragon templates,  copy the files from your Dragonsmith 1.1.1 kit, relabel the source files with the .cp extension and change the π to µ in the resource files.  You may want to change the state of the "Auto-quit" preference in the DrPr resource of the PlainTmpl.µ.rsrc file with ResEdit.  As it appears in the original release, this preference is reset, which causes plain Dragons to attempt to access nonexistent menus.  Two template project files are supplied.  TemplateSrc.µ includes all of the Dragonsmith source files and TemplateLib.µ includes the Dragonsmith library (which you built in step 4).  To use these templates, copy the project, resource and source file to another directory, rename the project and resource file so the resource file has the same name as the project plus the .rsrc extension, rename the source file, open the project and add the source file to it.
  31.  
  32. Points to remember
  33. ------------------
  34.  
  35. CodeWarrior is a somewhat different environment from Think C.  Make sure that you name the resource files appropriately so they will be included into the application.  See your CodeWarrior documentation for details.
  36.  
  37.  
  38. Changes to support CodeWarrior
  39. ----------------------------
  40.  
  41. The changes in the Dragonsmith kit files to support the Metrowerks CodeWarrior environment are of two type:  changes caused by the use of Apple’s Universal Headers and changes caused by the differences between CodeWarrior C++ and Think C.  The following list outlines the changes.
  42.  
  43.   All source files - Change the extension from .c to .cp to reflect the use of C++
  44.   All resource files - Change the π to an µ to be consistent with the project files
  45.   Dragon.cp - change to use Universal Procedure Pointers (UPPs)
  46.   Dragon.h - eliminate the “indirect” qualifier and fix calling sequence of SuspendAEvent
  47.   AppleEventQueue.cp - add a return value to the function Get
  48.   AppleEventQueue.h - change to use AppleEvents.h and UPPs, eliminate the “indirect” qualifier and fix a poorly formed typedef statement
  49.   AppleEventUtils.cp - add a return value to the function SendToSelf
  50.   FileUtils.cp - add a return value to the function RefNumToFSSpec
  51.   TrapUtils.cp - change to use UPPs for trap addresses
  52.   DPasser.cp - change to use the LowMem accessor function LMGetCurApName
  53.  
  54. Miscellaneous notes
  55. ------------------
  56.  
  57. All source code in the Dragonsmith kit is Copyright © 1992-1994 by Paul Hoffman but may be freely used, altered, and distributed in any way as long as it is GIVEN away rather than sold (except as expressly permitted by the author).
  58.  
  59. Paul M. Hoffman
  60. 302 W. Davis #2
  61. Ann Arbor MI 48103
  62. USA
  63.  
  64. Internet: paul.hoffman@umich.edu -or- dragonsmith@umich.edu
  65.  
  66. These changes are the result of work by Francis H Schiffer, 3rd.  They are derivative works from the files that were created by Paul M. Hoffman and so are covered by his copyright, which is expressed above.  
  67.  
  68.     Francis H Schiffer, 3rd
  69.     GEnie: skipschiffer
  70.     Internet: skipschiffer@GEnie.geis.com
  71.  
  72.